/*
 * @Description: 驾驶舱
 * @Date: 2023-11-16 09:18:11
 * @FilePath: \hksj-vued:\03code\hk-iot\src\api\configuration\server\index.ts
 */
import request from '/@/utils/request';
/**
 * @method listTopTen 水电排行前行
 * @method consumptionTrend 水电趋势图
 * @method electricityProportion 电功耗占比
 *  @method waterProportion 水功耗占比
 * 
 * @method equipmentOperationStatus 设备运行状态
 * @method energyConsumptionCost 能耗总量
 * @method energyConsumptionDetail 当日昨日水电量
 * @method departmentByOrganizationId 机构查询科室

 */
export function useCockpitApi() {
  return {
    listTopTen: (params: object) => {
      return request({
        url: '/property/listTopTen',
        method: 'POST',
        data: params,
      });
    },
    consumptionTrend: (params: object) => {
      return request({
        url: '/api/mqtt/largeScreen/queryConsumptionTrend',
        method: 'POST',
        data: params,
      });
    },
    electricityProportion: (params: object) => {
      return request({
        url: '/api/mqtt/largeScreen/queryEnergyConsumptionElectricityProportion',
        method: 'POST',
        data: params,
      });
    },
    waterProportion: (params: object) => {
      return request({
        url: '/api/mqtt/largeScreen/queryEnergyConsumptionWaterProportion',
        method: 'POST',
        data: params,
      });
    },
    equipmentOperationStatus: () => {
      return request({
        url: '/api/mqtt/largeScreen/selectEquipmentOperationStatus',
        method: 'POST',
      });
    },
    energyConsumptionCost: (params: object) => {
      return request({
        url: '/api/mqtt/largeScreen/queryEnergyConsumptionCost',
        method: 'POST',
        data: params,
      });
    },
    energyConsumptionDetail: (params: object) => {
      return request({
        url: '/api/mqtt/largeScreen/queryEnergyConsumptionDetail',
        method: 'POST',
        data: params,
      });
    },
    departmentByOrganizationId: (params: number) => {
      return request({
        url: `/api/mqtt/largeScreen/queryDepartmentByOrganizationId?organizationId=${params}`,
        method: 'GET',
      });
    },
  }
}